<%@page import="java.io.PrintWriter"%>
<%@page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.ResultSet"%>

<%
	Class.forName("oracle.jdbc.driver.OracleDriver");
	System.out.println("加载驱动 ");
	Connection con = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.134:1521:zhpt","limeng","limeng");
	System.out.println("创建连接 ");
	PreparedStatement prestam = con.prepareStatement("select 1 as result from dual");
	ResultSet rs = prestam.executeQuery();
	while(rs.next()){
		System.out.println(rs.getString(1));
	}
	if(con != null)
		con.close();
	con = null;
%>

